<LayoutEditFormBox :loading="load">
    <template slot="main">
        <LayoutCell>

            <el-form ref="shareEditForm" :model="shareForm" label-width="200px" label-position="left">
                <el-form-item label="分享方式">
                    <el-radio v-model="shareForm.shareType" label="1">分享当前页</el-radio>
                    <el-radio v-model="shareForm.shareType" label="2">指定链接</el-radio>
                    <p class="tips" v-if="shareForm.shareType == '1'">用户使用微信分享把商品页面“发送给朋友”时,分享当前页链接</p>
                    <p class="tips" v-if="shareForm.shareType == '2'">用户使用微信分享把商品页面“发送给朋友”时,分享指定商城页面链接</p>
                </el-form-item>
                  <el-form-item label="分享链接"
                             v-if="shareForm.shareType == '2'">
                       <el-col :span="8">
                         <SelectLink :appWindow="appWindow" v-model="shareForm.shareUrl"  ></SelectLink>
                       </el-col>
                </el-form-item>
                <el-form-item label="分享标题" prop="shareTitle">
                    <el-col :span="8">
                      <el-input v-model="shareForm.shareTitle" placeholder="请输入分享标题" maxlength="15" show-word-limit></el-input>
                    </el-col>
                </el-form-item>
                <el-form-item label="公众号分享图标" prop="mpShareUrl">
                    <SelectImageRadio :appWindow="appWindow" v-model="shareForm.mpShareUrl" >
                        <template slot-scope="scope" slot="item">
                            <img class="SelectResourcesImg" :src="scope.src" />
                        </template>
                    </SelectImageRadio>
                </el-form-item>
                <el-form-item label="小程序分享封面图片" prop="mpShareUrl" >
                    <el-radio v-model="shareForm.shareImageType" label="1">页面截图</el-radio>
                    <el-radio v-model="shareForm.shareImageType" label="2">自定义图片</el-radio>
                </el-form-item>
                <el-form-item v-if="shareForm.shareImageType == '2'">
                    <SelectImageRadio :appWindow="appWindow" v-model="shareForm.shareImageUrl" >
                        <template slot-scope="scope" slot="item">
                            <img class="SelectResourcesImg" :src="scope.src" />
                        </template>
                    </SelectImageRadio>
                </el-form-item>

                <el-form-item label="分享描述" prop="shareRemark">
                    <el-col :span="8">
                         <el-input v-model="shareForm.shareRemark" placeholder="请输入分享描述" maxlength="30" show-word-limit></el-input>
                    </el-col>
                </el-form-item>
            </el-form>

        </LayoutCell>

    </template>
    <template slot="footer">
        <el-button type="primary" slot="option" @click="updateShare">保存</el-button>
    </template>
</LayoutEditFormBox>